MFileLoader – A file load dialog window.
Creation: MFileLoader_New(caption$, path$, filter$, cancel, changeDir, x, y, pixelwidth, pixelheight)
caption$ - The text that is displayed caption title window.
path$ - Starting directory. Can be literal like “c:\game” or relative like “data\player\save”.
filter$ - File extension filter. empty=all; or any specific extension. “.avi”, “avi”, etc.
cancel – Allow cancel button feature. 0-cancel disabled; 1-cancel allowed.
changedir- Allow directory change. 0-none; 1-any inside starting directory; 2-full access drives/folders.
x – Pixel X coordinate for the top left corner of the textbox.
y – Pixel Y coordinate for the top left corner of the textbox.
pixelwidth – The width of the file load dialog in pixels.
pixelheight – The height of the file load dialog in pixels.
Functions:
MFileLoader_Clear(index)
Clears file load dialog to defaults.
MFileLoader_Delete(index)
Deletes the file load dialog.
MFileLoader_Draw(index)
Draws the file load dialog to screen.
MFileLoader_GetFileName(index)
Returns string filename currently selected. empty=no file; filename
MFileLoader_GetPath(index)
Returns string full directory path currently selected. empty=impossible; directory path
MFileLoader_GetSelected(index)
Returns file load dialog pressed status. 0=file not picked; 1=file was picked; 2=cancel
MFileLoader_Refresh(index)
Updates the file load dialog directory and file contents.